package com.wanxi.util;

import java.util.Arrays;
import java.util.Random;

public class JudgeJiOu {
    static int[] arr = new int[5];

    public static void main(String[] args) {

        setArray();
        judge();
    }

    private static void setArray() {
        Random aa = new Random();
        for (int i = 0; i < arr.length; i++) {
            arr[i] = aa.nextInt(10);
        }
        System.out.println(Arrays.toString(arr));
    }

    private static void judge() {
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] % 2 == 0) {
                System.out.println(arr[i] + "是偶数");
            } else {
                System.out.println(arr[i] + "是奇数");
            }
        }
    }
}
